import { getServices } from './index';
type API_LIST = {
  login: Function;
  loginOut: Function;
  getRegisterCaptcha: Function;
  register: Function;
  currentUser: Function;
  getUserList: Function;
  saveUser: Function;
  getUser: Function;
  delUserList: Function;
  //角色相关API
  saveAccess: Function;
  getAccess: Function;
  getAccessList: Function;
  delAccessList: Function;
  saveAccessList: Function;
  //岗位相关API
  saveJob: Function;
  getJob: Function;
  getJobList: Function;
  delJobList: Function;
  saveJobList: Function;
  //字典相关API
  saveField: Function;
  getField: Function;
  getFieldList: Function;
  delFieldList: Function;
  saveFieldList: Function;
  //地区省市相关API
  getAreaList: Function;
  getAreaTree: Function;
  //路由相关API
  getRouteList: Function;
  getRouteTree: Function;
  getRouteTreeList: Function;
  getRoute: Function;
  saveRoute: Function;
  delRouteList: Function;
  //部门相关API
  getDepartmentList: Function;
  getDepartmentTree: Function;
  getDepartmentTreeList: Function;
  getDepartment: Function;
  saveDepartment: Function;
  delDepartmentList: Function;
  //菜单相关API
  getMenuList: Function;
  getMenuTree: Function;
  getMenuTreeList: Function;
  getMenu: Function;
  saveMenu: Function;
  delMenuList: Function;
  //首页相关API
  getContent: Function;
};
export const API_LIST = {
  //用户相关API
  login: ['post', '/users/login'], //登录
  loginOut: ['post', '/users/loginOut'], //登出
  getRegisterCaptcha: ['post', '/users/getRegisterCaptcha'], //获取注册邮箱验证码
  register: ['post', '/users/register'], //注册邮箱
  currentUser: ['get', '/users/currentUser'], //获取登录者信息
  getUserList: ['post', '/users/getUserList'],
  saveUser: ['post', '/users/saveUser'],
  getUser: ['get', '/users/getUser'],
  delUserList: ['post', '/users/delUserList'],
  //角色相关API
  saveAccess: ['post', '/access/saveAccess'],
  getAccess: ['get', '/access/getAccess'],
  getAccessList: ['post', '/access/getAccessList'],
  delAccessList: ['post', '/access/delAccessList'],
  saveAccessList: ['post', '/access/saveAccessList'],
  //岗位相关API
  saveJob: ['post', '/job/saveJob'],
  getJob: ['get', '/job/getJob'],
  getJobList: ['post', '/job/getJobList'],
  delJobList: ['post', '/job/delJobList'],
  saveJobList: ['post', '/job/saveJobList'],
  //字典相关API
  saveField: ['post', '/field/saveField'],
  getField: ['get', '/field/getField'],
  getFieldList: ['post', '/field/getFieldList'],
  delFieldList: ['post', '/field/delFieldList'],
  saveFieldList: ['post', '/field/saveFieldList'],
  //地区省市相关API
  getAreaList: ['get', '/area/getAreaList'],
  getAreaTree: ['get', '/area/getAreaTree'],
  //路由相关API
  getRouteList: ['get', '/route/getRouteList'],
  getRouteTreeList: ['post', '/route/getRouteTreeList'],
  getRouteTree: ['get', '/route/getRouteTree'],
  getRoute: ['get', '/route/getRoute'],
  saveRoute: ['post', '/route/saveRoute'],
  delRouteList: ['post', '/route/delRouteList'],
  //部门相关API
  getDepartmentList: ['get', '/department/getDepartmentList'],
  getDepartmentTreeList: ['post', '/department/getDepartmentTreeList'],
  getDepartmentTree: ['get', '/department/getDepartmentTree'],
  getDepartment: ['get', '/department/getDepartment'],
  saveDepartment: ['post', '/department/saveDepartment'],
  delDepartmentList: ['post', '/department/delDepartmentList'],
  //菜单相关API
  getMenuList: ['get', '/menu/getMenuList'],
  getMenuTreeList: ['post', '/menu/getMenuTreeList'],
  getMenuTree: ['get', '/menu/getMenuTree'],
  getMenu: ['get', '/menu/getMenu'],
  saveMenu: ['post', '/menu/saveMenu'],
  delMenuList: ['post', '/menu/delMenuList'],
  //首页相关API
  getContent: ['get', '/serve/dailys/getContent'],
};

export const services: API_LIST = getServices(API_LIST);
